<template>
  <view class="container">
    <h2 class="title">{{article.title}}</h2>
    <text class="content">{{article.content}}</text>
    <image class="img" :src="article.imageUrl"></image>
  </view>
</template>

<script>
  import {
    getArticle
  } from '@/api/article.js'
  export default {
    data() {
      return {
        article: {}
      }
    },
    onLoad: function (option) { 
        getArticle(option.id).then((res)=>{
          this.article = res.data
        })
    },
    methods: {
      
    }
  }
</script>

<style scoped>
.container {
  background-color: white;
  padding: 10px;
}

.title {
  text-align: center;
}

</style>
